.class public abstract Lcom/estrongs/android/pop/esclasses/n;
.super Lcom/estrongs/android/pop/esclasses/f;
.source "GestureVideoController.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/esclasses/n$c;
    }
.end annotation


# instance fields
.field private m:Lcom/estrongs/android/pop/esclasses/e;

.field private n:Landroid/media/AudioManager;

.field protected o:Z

.field private p:I

.field private q:Landroid/view/GestureDetector;

.field protected r:F

.field protected s:I

.field private t:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/esclasses/f;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x1

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->o:Z

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 4
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/pop/esclasses/f;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, 0x1

    .line 5
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->o:Z

    const/4 p1, 0x0

    .line 6
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 7
    invoke-direct {p0, p1, p2, p3}, Lcom/estrongs/android/pop/esclasses/f;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x1

    .line 8
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->o:Z

    const/4 p1, 0x0

    .line 9
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/esclasses/n;I)I
    .locals 0

    .line 2
    iput p1, p0, Lcom/estrongs/android/pop/esclasses/n;->p:I

    return p1
.end method

.method static synthetic a(Lcom/estrongs/android/pop/esclasses/n;)Landroid/view/GestureDetector;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/esclasses/n;->q:Landroid/view/GestureDetector;

    return-object p0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/esclasses/n;F)V
    .locals 0

    .line 3
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/esclasses/n;->c(F)V

    return-void
.end method

.method public static a(Landroid/content/Context;Landroid/view/MotionEvent;)Z
    .locals 4

    const/high16 v0, 0x42200000    # 40.0f

    .line 18
    invoke-static {v0}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result v0

    .line 19
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v1

    int-to-float v2, v0

    cmpg-float v1, v1, v2

    if-ltz v1, :cond_1

    .line 20
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v1

    invoke-static {p0}, Lcom/estrongs/android/pop/utils/t;->e(Landroid/content/Context;)I

    move-result v3

    sub-int/2addr v3, v0

    int-to-float v3, v3

    cmpl-float v1, v1, v3

    if-gtz v1, :cond_1

    .line 21
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v1

    cmpg-float v1, v1, v2

    if-ltz v1, :cond_1

    .line 22
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result p1

    invoke-static {p0}, Lcom/estrongs/android/pop/utils/t;->b(Landroid/content/Context;)I

    move-result p0

    sub-int/2addr p0, v0

    int-to-float p0, p0

    cmpl-float p0, p1, p0

    if-lez p0, :cond_0

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    goto :goto_1

    :cond_1
    :goto_0
    const/4 p0, 0x1

    :goto_1
    return p0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/esclasses/n;Z)Z
    .locals 0

    .line 4
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return p1
.end method

.method static synthetic b(Lcom/estrongs/android/pop/esclasses/n;)Landroid/media/AudioManager;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/esclasses/n;->n:Landroid/media/AudioManager;

    return-object p0
.end method

.method private c(F)V
    .locals 5

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 3
    invoke-virtual {p0}, Lcom/estrongs/android/pop/esclasses/f;->a()V

    .line 4
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    instance-of v0, v0, Landroid/app/Activity;

    if-eqz v0, :cond_3

    .line 5
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    .line 6
    invoke-virtual {v0}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v1

    .line 7
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getMeasuredHeight()I

    move-result v2

    .line 8
    iget v3, p0, Lcom/estrongs/android/pop/esclasses/n;->r:F

    const/high16 v4, -0x40800000    # -1.0f

    cmpl-float v3, v3, v4

    if-nez v3, :cond_0

    const/high16 v3, 0x3f000000    # 0.5f

    iput v3, p0, Lcom/estrongs/android/pop/esclasses/n;->r:F

    :cond_0
    const/high16 v3, 0x40000000    # 2.0f

    mul-float p1, p1, v3

    int-to-float v2, v2

    div-float/2addr p1, v2

    const/high16 v2, 0x3f800000    # 1.0f

    mul-float p1, p1, v2

    .line 9
    iget v3, p0, Lcom/estrongs/android/pop/esclasses/n;->r:F

    add-float/2addr p1, v3

    const/4 v3, 0x0

    cmpg-float v4, p1, v3

    if-gez v4, :cond_1

    const/4 p1, 0x0

    :cond_1
    cmpl-float v3, p1, v2

    if-lez v3, :cond_2

    goto :goto_0

    :cond_2
    move v2, p1

    .line 10
    :goto_0
    iget-object p1, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const v3, 0x7f0805d1

    invoke-virtual {p1, v3}, Lcom/estrongs/android/pop/esclasses/e;->setIcon(I)V

    const/high16 p1, 0x42c80000    # 100.0f

    mul-float p1, p1, v2

    float-to-int p1, p1

    .line 11
    iget-object v3, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {v3, p1}, Lcom/estrongs/android/pop/esclasses/e;->setSlideProgress(I)V

    .line 12
    iput v2, v1, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F

    .line 13
    invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V

    :cond_3
    return-void
.end method

.method static synthetic c(Lcom/estrongs/android/pop/esclasses/n;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return p0
.end method


# virtual methods
.method protected a(F)V
    .locals 7

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    if-nez v0, :cond_0

    return-void

    .line 6
    :cond_0
    invoke-interface {v0}, Landroid/widget/MediaController$MediaPlayerControl;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 7
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    invoke-interface {v0}, Landroid/widget/MediaController$MediaPlayerControl;->pause()V

    .line 8
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 9
    invoke-virtual {p0}, Lcom/estrongs/android/pop/esclasses/f;->a()V

    neg-float p1, p1

    .line 10
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getMeasuredWidth()I

    move-result v0

    .line 11
    iget-object v2, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    invoke-interface {v2}, Landroid/widget/MediaController$MediaPlayerControl;->getDuration()I

    move-result v2

    .line 12
    iget-object v3, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    invoke-interface {v3}, Landroid/widget/MediaController$MediaPlayerControl;->getCurrentPosition()I

    move-result v3

    int-to-float v4, v2

    const v5, 0x47ea6000    # 120000.0f

    const/high16 v6, 0x3f800000    # 1.0f

    cmpg-float v5, v4, v5

    if-gtz v5, :cond_2

    const v5, 0x3e4ccccd    # 0.2f

    goto :goto_0

    :cond_2
    const/high16 v5, 0x3f800000    # 1.0f

    :goto_0
    int-to-float v0, v0

    div-float/2addr p1, v0

    const v0, 0x459c4000    # 5000.0f

    mul-float p1, p1, v0

    mul-float p1, p1, v5

    float-to-int p1, p1

    add-int/2addr p1, v3

    if-le p1, v2, :cond_3

    move p1, v2

    :cond_3
    if-gez p1, :cond_4

    goto :goto_1

    :cond_4
    move v1, p1

    .line 13
    :goto_1
    iput v1, p0, Lcom/estrongs/android/pop/esclasses/n;->s:I

    int-to-float p1, v1

    mul-float p1, p1, v6

    div-float/2addr p1, v4

    const/high16 v0, 0x42c80000    # 100.0f

    mul-float p1, p1, v0

    float-to-int p1, p1

    .line 14
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/esclasses/e;->setSlideProgress(I)V

    .line 15
    iget-object p1, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {p0, v1}, Lcom/estrongs/android/pop/esclasses/f;->b(I)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "/"

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0, v2}, Lcom/estrongs/android/pop/esclasses/f;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/pop/esclasses/e;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 16
    iget-object p1, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    iget v0, p0, Lcom/estrongs/android/pop/esclasses/n;->s:I

    invoke-interface {p1, v0}, Landroid/widget/MediaController$MediaPlayerControl;->seekTo(I)V

    const/4 p1, 0x1

    .line 17
    iput-boolean p1, p0, Lcom/estrongs/android/pop/esclasses/n;->t:Z

    return-void
.end method

.method protected b()V
    .locals 3

    .line 2
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/f;->b()V

    .line 3
    new-instance v0, Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/estrongs/android/pop/esclasses/e;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const/16 v1, 0x8

    .line 4
    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 6
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "audio"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    iput-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->n:Landroid/media/AudioManager;

    .line 7
    new-instance v0, Landroid/view/GestureDetector;

    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v1

    new-instance v2, Lcom/estrongs/android/pop/esclasses/n$c;

    invoke-direct {v2, p0}, Lcom/estrongs/android/pop/esclasses/n$c;-><init>(Lcom/estrongs/android/pop/esclasses/n;)V

    invoke-direct {v0, v1, v2}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V

    iput-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->q:Landroid/view/GestureDetector;

    .line 8
    new-instance v0, Lcom/estrongs/android/pop/esclasses/n$a;

    invoke-direct {v0, p0}, Lcom/estrongs/android/pop/esclasses/n$a;-><init>(Lcom/estrongs/android/pop/esclasses/n;)V

    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    return-void
.end method

.method protected b(F)V
    .locals 5

    .line 9
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 10
    invoke-virtual {p0}, Lcom/estrongs/android/pop/esclasses/f;->a()V

    .line 11
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->n:Landroid/media/AudioManager;

    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Landroid/media/AudioManager;->getStreamMaxVolume(I)I

    move-result v0

    .line 12
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getMeasuredHeight()I

    move-result v3

    const/high16 v4, 0x40000000    # 2.0f

    mul-float p1, p1, v4

    int-to-float v3, v3

    div-float/2addr p1, v3

    int-to-float v0, v0

    mul-float p1, p1, v0

    .line 13
    iget v3, p0, Lcom/estrongs/android/pop/esclasses/n;->p:I

    int-to-float v3, v3

    add-float/2addr v3, p1

    cmpl-float p1, v3, v0

    if-lez p1, :cond_0

    move v3, v0

    .line 14
    :cond_0
    iget-object p1, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const v4, 0x7f0805de

    invoke-virtual {p1, v4}, Lcom/estrongs/android/pop/esclasses/e;->setIcon(I)V

    div-float p1, v3, v0

    const/high16 v0, 0x42c80000    # 100.0f

    mul-float p1, p1, v0

    float-to-int p1, p1

    .line 15
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/esclasses/e;->setSlideProgress(I)V

    .line 16
    iget-object p1, p0, Lcom/estrongs/android/pop/esclasses/n;->n:Landroid/media/AudioManager;

    float-to-int v0, v3

    invoke-virtual {p1, v2, v0, v1}, Landroid/media/AudioManager;->setStreamVolume(III)V

    return-void
.end method

.method protected g()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    invoke-interface {v0}, Landroid/widget/MediaController$MediaPlayerControl;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    invoke-interface {v0}, Landroid/widget/MediaController$MediaPlayerControl;->pause()V

    goto :goto_0

    .line 4
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/f;->d:Landroid/widget/MediaController$MediaPlayerControl;

    invoke-interface {v0}, Landroid/widget/MediaController$MediaPlayerControl;->start()V

    :goto_0
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 3

    .line 1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    .line 2
    :goto_0
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->q:Landroid/view/GestureDetector;

    invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    if-nez v0, :cond_2

    if-eqz v1, :cond_2

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v0

    if-nez v0, :cond_1

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/esclasses/n;->m:Lcom/estrongs/android/pop/esclasses/e;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 5
    :cond_1
    new-instance v0, Lcom/estrongs/android/pop/esclasses/n$b;

    invoke-direct {v0, p0}, Lcom/estrongs/android/pop/esclasses/n$b;-><init>(Lcom/estrongs/android/pop/esclasses/n;)V

    const-wide/16 v1, 0xc8

    invoke-virtual {p0, v0, v1, v2}, Landroid/widget/FrameLayout;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 6
    :cond_2
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1
.end method
